package com.fh.activiti.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/")
public class HomeController {
    @GetMapping("/")
    public ModelAndView gotoTask(){
        return new ModelAndView("act/task/gotoTask");
    }
    @GetMapping("/hello")
    public ModelAndView hello(HttpServletRequest request){
        request.setAttribute("name", "test");
        return new ModelAndView("hello");
    }
}
